import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './assets/css/common.css'
import axios from 'axios'

//映入elementui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


//注册全局组件
Vue.use(ElementUI);

Vue.config.productionTip = false



axios.defaults.baseURL = 'http://localhost:3000'
//解决跨域
axios.defaults.withCredentials = true; // 携带cookie
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; // 判断是否为ajax请求

// 注册为全局组件
Vue.prototype.$http = axios;


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
